//
//  LS_DetailViewController.swift
//  weibo
//
//  Created by 罗李苏 on 16/5/20.
//  Copyright © 2016年 Apple. All rights reserved.
//

import UIKit

class LS_DetailViewController: UIViewController {

    override func viewDidLoad() {
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        //设置背景
        view.backgroundColor = UIColor.redColor()
        
//        let back = UIBarButtonItem(imageName: "navigationbar_back_withtext", target: self, action: #selector(LS_DetailViewController.back), title: "返回")
//        navigationItem.leftBarButtonItem = back
        //进入多级页面
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .Plain, target: self, action: #selector(next))
    }
    
  @objc private func next(){
    let next = LS_DetailViewController()
    
//    navigationController?.popViewControllerAnimated(true)
    navigationController?.pushViewController(next, animated: true)
    
    
    }
}
